const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
    host:'smtp.163.com', //  发送方的邮箱服务器地址
    port:465,
    secureConnection:false, //  是否使用SSL
    auth:{
        "user":'songxiong101821ga@163.com',
        "pass":'PJQdd5rSb5atr4JK'
    }
});

module.exports.send = (mailOptions) => {
    transporter.sendMail(mailOptions,function(error,info){
        if(error){
            return console.log(error)
        }
        console.log('success')
    })
}